package com.qd.panda.mq.bo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * 充电信息
 *
 * @author sjk
 */

/**
 模拟开始充电
{
	"parkingId": "3db4c2f5c2c7604d1e47eb3a4841768d",
	"plateNumber": "川ADB8U87",
	"operatorID": "aaaa",
	"connectorID": "bbbb",
	"startChargeSeq": "no12345678",
	"startChargeSeqStat": 1,
	"startTime": "2022-11-30 10:00:00",
	"endTime": "",
	"totalPower": 0.0,
	"totalElecMoney": 0.0,
	"totalSeviceMoney": 0.0,
	"totalMoney": 0.0,
	"soc": 80
}
 模拟结束充电
{
 "parkingId": "3db4c2f5c2c7604d1e47eb3a4841768d",
 "plateNumber": "川ADB8U87",
 "operatorID": "aaaa",
 "connectorID": "bbbb",
 "startChargeSeq": "no12345678",
 "startChargeSeqStat": 4,
 "startTime": "2022-11-30 10:00:00",
 "endTime": "2022-11-30 11:00:00",
 "totalPower": 30.0,
 "totalElecMoney": 20.0,
 "totalSeviceMoney": 10.0,
 "totalMoney": 30.0,
 "soc": 90
}
 */
@Data
@Accessors(chain = true)
@ToString
public class ChargeBO {
    /**
     * 停车场ID
     */
    private String parkingId;
    /**
     * 车牌
     */
    private String plateNumber;
    /**
     * 运营商编号
     */
    @JsonProperty("operatorID")
    private String operatorID;
    /**
     * 充电设备编号
     */
    @JsonProperty("connectorID")
    private String connectorID;
    /**
     * 订单编号
     */
    private String startChargeSeq;
    /**
     * 充电订单状态:1：启动中,2：充电中,3：停止中,4：已结束,5：未知
     */
    private Integer startChargeSeqStat;
    /**
     * 插枪状态，1空闲（把枪的意思） 2占用
     */
    private Integer status;
    /**
     * 充电开始时间
     */
    private String startTime;
    /**
     * 充电结束时间
     */
    private String endTime;
    /**
     * 累计充电量
     */
    private BigDecimal totalPower;
    /**
     * 总电费
     */
    @JsonProperty("totalElecMoney")
    private BigDecimal totalElecMoney;
    /**
     * 总服务费
     */
    @JsonProperty("totalSeviceMoney")
    private BigDecimal totalSeviceMoney;
    /**
     * 累计总金额
     */
    private BigDecimal totalMoney;
    /**
     * 剩余电量
     */
    private Integer soc;

    public void freeData() {
        this.plateNumber = null;
        this.parkingId = null;
        this.operatorID = null;
        this.connectorID = null;
        this.startChargeSeq = null;
        this.startChargeSeqStat = null;
        this.startTime = null;
        this.endTime = null;
        this.totalPower = null;
        this.totalElecMoney = null;
        this.totalSeviceMoney = null;
        this.totalMoney = null;
        this.soc = null;
        this.status = null;
    }
}
